package com.lb.design.pattern.observer.gper;

import com.google.common.eventbus.Subscribe;

/**
 * @author lb
 * @Title: Teacher
 * @Description: 订阅者、观察者
 * @date 2019/03/19  18:40
 */
public class Teacher {

    private String name;

    public Teacher(String name) {
        this.name = name;
    }

    @Subscribe
    public void listen(Gper gper) {
        System.out.println("===============================");

        System.out.println(name+"老师您收到一个问题，问题内容:"+gper.getQuestion().getContent()+"提问者："+gper.getQuestion().getUserName());
    }
}
